<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/white/common/common.jsp"%>
<%@include file="/white/common/taglibs.jsp"%>
<html>
<head>
<script type="text/javascript">

	function submitForm() {
		var searchForm = document.getElementById("searchForm");
		searchForm.submit();
	}

	function notAllowedLockSelf(id) {
		var searchForm = document.getElementById("searchForm");
		searchForm.action = "userAction-" + id + "!lock.action";
		searchForm.submit();
	}

	function validateModify() {
		var check = document.getElementsByName("selectedIds");
		var a = 0;
		var id;

		for (var i = 0; i < check.length; i++) {
			if (check[i].checked == true) {
				a++;
				id = check[i].value;
			}
		}

		if (a == 1) {
			var searchForm = document.getElementById("searchForm");
			searchForm.action = "tmApponoffContinuousActiveWeekAction-" + id
					+ "!toEdit.action";
			searchForm.submit();
			return true;
		} else {
			alert("请�?择一条记�?");
			return false;
		}
	}

	function validateDelete() {
		var check = document.getElementsByName("selectedIds");
		var a = false;
		for (var i = 0; i < check.length; i++) {
			if (check[i].checked == true) {
				a = true;
				break;
			}
		}
		if (a) {
			return confirm('你确定所�?');
		} else {
			alert("请先择你要删除的内容!!");
			return false;
		}
	}

	function doDelete() {
		var searchForm = document.getElementById("searchForm");
		searchForm.action = 'tmApponoffContinuousActiveWeekAction!delete.action';
		searchForm.submit();
		return true;
	}

	function displayResult() {
		var result = "<s:property value='result'/>";
		if (result != null && result != "") {
			alert(result);
		}
	}

</script>
</head>
<body onload="displayResult()">
	<s:form method="post"
		action="tmApponoffContinuousActiveWeekAction!queryByPage.action"
		theme="simple" id="searchForm">
		<div id="div_title">
			<h3>周用户构成</h3>
			<div id="div_search">
				<table>
					<tr>
						<!-- 查询条件 -->
						<td width="40" align="right">
						日期:
						</td>
						<td>
							<s:textfield name="query_weekDate" label="日期" size="8" maxlength="10"
							onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyyMMdd', minDate:'1900-01-01',maxDate:'',startDate:'%y-%M-{%d-1}'})">
							</s:textfield>
							-	
							<s:textfield name="query_dayId_end" label="日期" size="8" maxlength="10"
							onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyyMMdd', minDate:'1990-01-01',maxDate:'',startDate:'%y-%M-{%d-1}'})">
							</s:textfield>
						</td>
						<td width="80" align="right">
							<authz:authorize ifAnyGranted="OMC_CLIENT_LOG_COUNT_DAY_COUNT">
								<s:submit cssClass="submit_search" value="搜索"
								action="tmApponoffContinuousActiveWeekAction!queryByPage" />
						</authz:authorize>
						</td>
					</tr>
				</table>
			</div>
		</div>
		
		<!--列表 �?�� -->
		<table cellpadding="0" cellspacing="0" class="t_list">
			<tr>
				<!--列表头部 -->
				<th width="80">时间</th>
				<th>新用户</th>
				<th>本周回流用户</th>
				<th>连续活跃2周用户</th>
				<th>连续活跃3周用户</th>
				<th>连续活跃4周用户</th>
				<th>忠诚用户</th>
				<th>周活跃用户</th>
			</tr>
			<s:iterator value="resultList" status="sindex">
				<tr>
					<td><s:property value="WEEK_DATE" /></td>
					<td><s:property value="NEW_USER" /></td>
					<td><s:property value="BACK_USER" /></td>
					<td><s:property value="TWO_WEEK" /></td>
					<td><s:property value="THREE_WEEK" /></td>
					<td><s:property value="FOUR_WEEK" /></td>
					<td><s:property value="FIVE_WEEK" /></td>
					<td><s:property value="CNTS" /></td>
					
				</tr>
			</s:iterator>
		</table>
		<!--列表 结束 -->
		<!--分页 �?�� -->
		<s:if test="resultList.size() > 0">
			<table border="0" cellspacing="0" cellpadding="0" class="t_bottom">
				<tr>
					<td><%@include file="/white/common/pageList.jsp"%></td>
				</tr>
			</table>
		</s:if>
		<!--分页 结束 -->

	</s:form>
</body>
</html>
